/**
 * 菜单管理
 */
import { get, post, put, remove } from '../../http'

// 获取菜单表格
const menuTableAPI = () => get('/menu/menuList')
// 新增菜单
const addMenuAPI = (params) => post('/menu', params)
// 修改菜单
const updateAPI = (id, params) => put('/menu/' + id, params)
// 上移、下移
const moveAPI = (url, id, params) => put('/menu/' + url + '/' + id, params)
// 删除菜单
const dropMenuAPI = (id, params) => remove('/menu/' + id, params)

export default {
  menuTableAPI,
  addMenuAPI,
  updateAPI,
  moveAPI,
  dropMenuAPI
}
